package com.etxxy.web.controller.member;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.etxxy.member.domain.Member;
import com.etxxy.member.service.MemberService;
import com.etxxy.web.controller.BaseController;

@RestController
@RequestMapping("member")
public class MemberController extends BaseController {
	@Autowired
	private MemberService memberService;
	
	@RequestMapping("index")
	public ModelAndView index(){
		return new ModelAndView("member/index");
	}
	
	@RequestMapping("doRegister")
	public String doRegister(Member member){
		return null;
	}
	
	/**
	 * @category 生成二维码用于扫码登陆
	 */
	@RequestMapping(value = "doQrLogin/{id}" ,produces = { "application/json;charset=UTF-8" })
	public String doQrLogin(@PathVariable("id") String id){
		//校驗來源
		try {
			Thread.sleep(60000);
		} catch (InterruptedException e) {
			//中断之后进行
		}
		//id和app進行綁定
		
		return null;
	}
}
